// src/directives/highlight.js
import hljs from 'highlight.js'
import 'highlight.js/styles/github.css'

export default {
    bind(el) {
        let blocks = el.querySelectorAll('pre code')
        blocks.forEach((block) => {
            hljs.highlightBlock(block)
        })
    },
    componentUpdated(el) {
        let blocks = el.querySelectorAll('pre code')
        blocks.forEach((block) => {
            hljs.highlightBlock(block)
        })
    }
}
